<?php

require_once 'PipesImpl/Form/Controls.php';
require_once 'PipesImpl/Model.php';

class Pipes_Form_Controls implements PipesImpl_Form_Controls
{
	private $_model = null;
	public function __construct(PipesImpl_Model $model) {
		$this->_model = $model;
	}
	
	public function render() {
		$modelName = $this->_model->getName();
		
		return <<<END
<div>
	<input type="hidden" id="{$modelName}__action" name="pipes[action][{$modelName}]" value="" />
	<input type="submit" id="{$modelName}__submit" onclick="$('{$modelName}__action').value='Save';" value="Save" />
</div>

END;
	}
}
